home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr42 / smixw111.zip / SMIXW111.DOC < prev    next >
Text File  |  1995-02-24  |  6KB  |  121 lines

  1.             _____      __    __     ____     __   __       _     _
  2.            /  _  \    |  \  /  |   |    |   |  \ /  |     | |   | |
  3.           |  / \__|   |   \/   |    |  |     \  ~  /      | |   | |
  4.           |  \___     |        |    |  |      |   |       | |   | |
  5.            \___  \    |  /\/\  |    |  |      |   |       | | _ | |
  6.            __  \  |   |  |  |  |    |  |      |   |       | |/ \| |
  7.           |  \_/  |   |  |  |  |    |  |     /  ^  \      |   _   |
  8.            \_____/    |__|  |__|   |____|   |__/ \__|     \__/ \__/
  9.  
  10.                    for Watcom C DOS/4GW protected mode
  11.                                Version 1.11
  12.  
  13.                     Written by Ethan Brodsky (2/24/95)
  14.           Copyright 1995 by Ethan Brodsky.  All rights reserved.
  15.  
  16. This library is distributed AS IS.  The author specifically disclaims
  17. responsibility for any loss of profit or any consequential, incidental,
  18. or other damages.  SMIXW is freeware and is distributed with full source
  19. code, which is copyright by Ethan Brodsky.  You are free to incorporate
  20. the code in full or part into your own programs as long as credit is
  21. given to Ethan Brodsky.  The source code may be distributed in its
  22. original form only, including this documentation and the copyright
  23. notices.
  24.  
  25. ------------------------------------------------------------------------
  26.  
  27. You may have used my SBVOX and SBDSP units.  They both played one VOC
  28. file at a time.  The whole VOC file had to be loaded into conventional
  29. memory, taking valuable memory from a real mode program.
  30.  
  31. SMIXW will play up to 8 simultaneous sounds on a Sound Blaster or
  32. compatible in protected mode.  The sounds are stored anywhere in memory
  33. and are mixed into a small buffer as needed.  It uses auto initialized
  34. DMA if a SBPro or higher is installed, eliminating clicks between
  35. blocks. On a SB16 is installed, it will use 16-bit sound output,
  36. increasing the sound quality.  Full Watcom C code for protected mode
  37. under the DOS/4GW DOS extender is included.
  38.  
  39. The sounds are stored on disk as raw signed 8-bit sample data at a
  40. sampling rate of 22050 HZ and are loaded anywhere in memory.  The
  41. data is mixed into a 16-bit buffer one block at a time, then copied
  42. down to an 8 or 16 bit buffer in conventional memory for DMA output.
  43.  
  44. Please test this on your setup (Especially if you have a Sound Blaster
  45. compatible, a SB on IRQ10, or something out of the ordinary) and report
  46. any imcompatibilities to me.  I have only tested this version on my
  47. SB16, but it should work on other configurations.
  48.  
  49. As the block size is increased, the sound latency will also increase.
  50. New sound effects are only started at the beginning of each block,
  51. so a block size of 256 gives a latency of about 1/43 of a second.
  52. This is the maximum time that can pass between when the StartSound
  53. procedure is called and when the sound starts playing.  In case you are
  54. wondering about the three counters displayed by the test program, the
  55. first one counts in the CPU's free time, the second counts the number
  56. of interrupts that have occurred, and the third is the number of sounds
  57. currently being played.  If you have an incompatibility problem, please
  58. tell me what each counter is doing.
  59.  
  60. SMIXC uses a raw 8-bit unsigned file format.  I have included a program
  61. that will convert WAV files to the raw format necessary.  The WAV files
  62. must be 8-bit and sampled at 22050 HZ, or the output will be distorted.
  63.  
  64. One important pointer.  The SMIX module MUST be compiled using the "-zu"
  65. compiler switch.  The Watcom code generator erroneously assumes that
  66. SS == DS when generating code for an interrupt handler.  The compiler
  67. then uses EBP to address data in DS and your program will terminate
  68. with a stack fault upon the first sound interrupt.  "-zu" tells the
  69. compiler not to make this assumption and is the best workaround for
  70. this compiler bug.  (Another option is to disable optimizations, but
  71. this will cause the compiler to generate terrible code)
  72.  
  73. I have several improvements planned, but I need feedback.  If you are
  74. using my code, I would greatly appreciate it if you would mail me and
  75. tell me about it.  If you have any bug reports, suggestions, or have
  76. made improvements, please tell me!  I also have finished a FM synthesis
  77. MIDI music library and am working on a digital music library, so tell me
  78. what you are interested in!
  79.  
  80. This library is freeware, but I would appreciate contributions so I can
  81. continue to buy development kits and upgrade my computer.  You don't
  82. NEED to send me anything, but if you are making money using this, please
  83. send whatever you feel that it is worth.
  84.  
  85. Features:
  86.   * Up to 8 sounds played simultaneously
  87.   * Sampling rate of 22050 HZ
  88.   * Autoinitialized DMA prevents clicking
  89.   * 16-bit sound output increases quality
  90.   * Mixes in the background using a fraction of CPU time
  91.  
  92. ------------------------------------------------------------------------
  93.  
  94. There are several ways to contact me:
  95.     E-Mail:  ericbrodsky@psl.wisc.edu (Preferred)
  96.     WWW:     http://www.xraylith.wisc.edu/~ebrodsky/
  97.     Phone:   (608) 238-4830
  98.     Mail:
  99.         Ethan Brodsky
  100.       4010 Cherokee Dr.
  101.       Madison, WI 53711
  102.  
  103. Bug fixes and other announcements will be posted in:
  104.     alt.sb.programmer
  105.     comp.sys.ibm.pc.soundcard.tech
  106.     rec.games.programmer
  107.  
  108. Up-to-date versions may be downloaded from:
  109.     x2ftp.oulu.fi /pub/msdos/programming/mxlibs/smixw*.zip
  110.       The directory structure at x2ftp is currently under reorganization
  111.       and the file will probably be moved to a different directory.
  112.     http://www.xraylith.wisc.edu/~ebrodsky/smix/smix.html
  113.  
  114. Revision history:
  115.  1.11 - Initial release
  116.  
  117. I've been looking to get in with a commercial software company.  If any
  118. companies are interested, write to me at the above address.  Thanks!
  119.  
  120.     Ethan Brodsky
  121.